// pages/calorieMenuName/calorieMenuName.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    img_url: "",
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function(options) {
    let foodName = options.foodName;
    let calorie = options.calorie;
    let mealName = options.mealName;
    let foodUrl = {
      "鲜虾牛油果烘蛋": {
        1400: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-1-breakfast-1400.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-1-lunch-1400.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-1-supper-1400.jpg",
        },
        1600: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-1-breakfast-1600.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-1-lunch-1600.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-1-supper-1600.jpg",
        },
        1800: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-1-breakfast-1800.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-1-lunch-1800.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-1-supper-1800.jpg",
        },
        2000: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-1-breakfast-2000.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-1-lunch-2000.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-1-supper-2000.jpg",
        }
      },
      "番茄浓汁烩鳕鱼": {
        1400: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-2-breakfast-1400.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-2-lunch-1400.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-2-supper-1400.jpg",
        },
        1600: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-2-breakfast-1600.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-2-lunch-1600.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-2-supper-1600.jpg",
        },
        1800: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-2-breakfast-1800.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-2-lunch-1800.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-2-supper-1800.jpg",
        },
        2000: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-2-breakfast-2000.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-2-lunch-2000.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-2-supper-2000.jpg",
        }
      },
      "菠萝笋丝焗里脊": {
        1400: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-3-breakfast-1400.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-3-lunch-1400.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-3-supper-1400.jpg",
        },
        1600: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-3-breakfast-1600.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-3-lunch-1600.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-3-supper-1600.jpg",
        },
        1800: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-3-breakfast-1800.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-3-lunch-1800.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-3-supper-1800.jpg",
        },
        2000: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-3-breakfast-2000.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-3-lunch-2000.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-3-supper-2000.jpg",
        }
      },
      "酱烧鱿鱼花": {
        1400: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-4-breakfast-1400.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-4-lunch-1400.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-4-supper-1400.jpg",
        },
        1600: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-4-breakfast-1600.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-4-lunch-1600.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-4-supper-1600.jpg",
        },
        1800: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-4-breakfast-1800.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-4-lunch-1800.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-4-supper-1800.jpg",
        },
        2000: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-4-breakfast-2000.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-4-lunch-2000.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-4-supper-2000.jpg",
        }
      },
      "咖喱豆腐鸡": {
        1400: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-5-breakfast-1400.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-5-lunch-1400.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-5-supper-1400.jpg",
        },
        1600: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-5-breakfast-1600.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-5-lunch-1600.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-5-supper-1600.jpg",
        },
        1800: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-5-breakfast-1800.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-5-lunch-1800.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-5-supper-1800.jpg",
        },
        2000: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-5-breakfast-2000.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-5-lunch-2000.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-5-supper-2000.jpg",
        }
      },
      "花生酱香蕉派": {
        1400: "",
        1600: "",
        1800: "",
        2000: ""
      },

      "至尊时蔬烤鸡意面": {
        1400: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-7-breakfast-1400.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-7-lunch-1400.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-7-supper-1400.jpg",
        },
        1600: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-7-breakfast-1600.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-7-lunch-1600.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-7-supper-1600.jpg",
        },
        1800: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-7-breakfast-1800.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-7-lunch-1800.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-7-supper-1800.jpg",
        },
        2000: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-7-breakfast-2000.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-7-lunch-2000.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-7-supper-2000.jpg",
        }
      },
      "和风滑嫩拼": {
        1400: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-10-breakfast-1400.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-10-lunch-1400.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-10-supper-1400.jpg",
        },
        1600: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-10-breakfast-1600.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-10-lunch-1600.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-10-supper-1600.jpg",
        },
        1800: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-10-breakfast-1800.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-10-lunch-1800.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-10-supper-1800.jpg",
        },
        2000: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-10-breakfast-2000.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-10-lunch-2000.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-10-supper-2000.jpg",
        }
      },
      "秘制芦笋牛肉": {
        1400: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-6-breakfast-1400.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-6-lunch-1400.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-6-supper-1400.jpg",
        },
        1600: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-6-breakfast-1600.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-6-lunch-1600.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-6-supper-1600.jpg",
        },
        1800: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-6-breakfast-1800.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-6-lunch-1800.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-6-supper-1800.jpg",
        },
        2000: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-6-breakfast-2000.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-6-lunch-2000.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-6-supper-2000.jpg",
        }
      },
      "惹味缤纷鸡饼": {
        1400: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-9-breakfast-1400.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-9-lunch-1400.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-9-supper-1400.jpg",
        },
        1600: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-9-breakfast-1600.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-9-lunch-1600.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-9-supper-1600.jpg",
        },
        1800: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-9-breakfast-1800.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-9-lunch-1800.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-9-supper-1800.jpg",
        },
        2000: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-9-breakfast-2000.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-9-lunch-2000.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-9-supper-2000.jpg",
        }
      },
      "夏日清甜面包布丁": {
        1400: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-8-breakfast-1400.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-8-lunch-1400.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-8-supper-1400.jpg",
        },
        1600: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-8-breakfast-1600.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-8-lunch-1600.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-8-supper-1600.jpg",
        },
        1800: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-8-breakfast-1800.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-8-lunch-1800.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-8-supper-1800.jpg",
        },
        2000: {
          breakfast: "https://upinfo.com.cn/uploads/meal-templates/food-8-breakfast-2000.jpg",
          lunch: "https://upinfo.com.cn/uploads/meal-templates/food-8-lunch-2000.jpg",
          supper: "https://upinfo.com.cn/uploads/meal-templates/food-8-supper-2000.jpg",
        }
      }
    }

    this.setData({
      img_url: foodUrl[foodName][calorie][mealName]
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function() {

  }
})